package com.ghbank.rdws.management.controller;


import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ghbank.rdws.common.command.ShellExecutor;
import com.ghbank.rdws.common.http.RichResponseEntity;

import lombok.extern.slf4j.Slf4j;

@RestController
@Slf4j
public class CommandController {
    @GetMapping(value = "/command/execute")
    public RichResponseEntity<String> execute(String command) {
        String result = ShellExecutor.execute(command);
        return RichResponseEntity.ok(result);
    } 
}
